import { GetProductionLineListData } from "./apiTypes"
import request from "/@/utils/request"


/**
 * 获取所有工序
 * @param data
 */
export function getAllProcessList(data?: any) {
    return request({
        url: '/wms/process/GetAllProcessList',
        method: 'post',
        data: data
    })
}

/**
 * 根据工序id获取产线
 * @param data
 */
export function getProductionlineByProcessId(data?: any) {
    return request({
        url: '/wms/process/GetProductionlineByProcessId',
        method: 'post',
        data: data
    })
}

/**
 * 根据产线id获取库位
 * @param data
 */
export function getProcessLocationByPrdLineId(data?: any) {
    return request({
        url: '/wms/process/GetProcessLocationByPrdLineId',
        method: 'post',
        data: data
    })
}

/**
 * 删除工序
 * @param data
 */
export function deleteProcessByIds(data?: any) {
    return request({
        url: '/wms/process/DeleteProcessByIds',
        method: 'post',
        data: data
    })
}

/**
 * 删除产线
 * @param data
 */
export function deleteProductionlineByIds(data?: any) {
    return request({
        url: '/wms/process/DeleteProductionlineByIds',
        method: 'post',
        data: data
    })
}

/**
 * 新增产线
 * @param data
 */
export function createOrEditProcess(data?: any) {
    return request({
        url: '/wms/process/CreateOrEditProcess',
        method: 'post',
        data: data
    })
}

/**
 * 新增产线
 * @param data
 */
export function createOrEditProductionline(data?: any) {
    return request({
        url: '/wms/process/CreateOrEditProductionline',
        method: 'post',
        data: data
    })
}

/**
 * 获取仓库
 * @param data
 */
export function getAllWarehouse(data?: any) {
    return request({
        url: '/wms/warehouse/GetAllWarehouse',
        method: 'post',
        data: data
    })
}

/**
 * 根据物料编码或者名称获取所有物料
 * @param data
 */
export function getAllMaterialsForNameOrCode(data?: any) {
    return request({
        url: '/wms/Material/GetAllMaterialsForNameOrCode',
        method: 'post',
        data: data
    })
}

/**
 * 根据物料编码或者名称获取所有物料
 * @param data
 */
export function getLocationLists(data?: any) {
    return request({
        url: '/wms/Location/GetLocationListToPage',
        method: 'post',
        data: data
    })
}

/**
 * 根据产线id获取库位产线关联信息
 * @param data
 */
export function getProcessLocationByPrdlineid(data?: any) {
    return request({
        url: '/wms/Location/GetProcessLocationByPrdlineid',
        method: 'post',
        data: data
    })
}

/**
 * 绑定产线和库位
 * @param data
 */
export function bindProcessLineLocation(data?: any) {
    return request({
        url: '/wms/Location/BindProcessLineLocation',
        method: 'post',
        data: data
    })
}